<template>
  <div class="app-container">
    <el-tabs v-model="currentTabName" @tab-click="handleClick">
      <el-tab-pane label="商店数据" name="List">
        <List v-if="currentTabName === 'List'" />
      </el-tab-pane>
      <el-tab-pane v-if="checkPermission(permissionRoles.shop_config)" label="商店配置" name="ShopConfig">
        <ShopConfig v-if="currentTabName === 'ShopConfig'" />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
import ShopConfig from './config'
import List from './list'
import checkPermission from '@/utils/permission'

export default {
  name: 'Shop',
  components: { ShopConfig, List },
  data() {
    return {
      permissionRoles: this.$store.state.user.permissionRoles,
      currentTabName: 'List'
    }
  },
  methods: {
    checkPermission,
    handleClick() {}
  }
}
</script>
